package com.suray.wcs.res.enums;

import com.suray.basic.wcs.path.core.Node;

import java.util.List;


/**
 * 行驶
 *
 * @author szn
 */
public class MoveOrder implements OrderBase {
    /**
     * 任务序号
     */
    private int taskNo;
    /**
     * 任务类型
     * {@link ResTaskType}
     */
    private int taskType;
    /**
     * 段总数或者段序号
     */
    private int segmentNo;
    /**
     * 节点数组
     */
    private List<Node> nodeList;

    public MoveOrder(int taskNo, int taskType, int segmentNo, List<Node> nodeList) {
        super();
        this.taskNo = taskNo;
        this.taskType = taskType;
        this.segmentNo = segmentNo;
        this.nodeList = nodeList;
    }

    public MoveOrder(int taskNo, int taskType, int segmentNo) {
        super();
        this.taskNo = taskNo;
        this.taskType = taskType;
        this.segmentNo = segmentNo;
    }

    public int getTaskNo() {
        return taskNo;
    }

    public void setTaskNo(int taskNo) {
        this.taskNo = taskNo;
    }

    public int getTaskType() {
        return taskType;
    }

    public void setTaskType(int taskType) {
        this.taskType = taskType;
    }

    public int getSegmentNo() {
        return segmentNo;
    }

    public void setSegmentNo(int segmentNo) {
        this.segmentNo = segmentNo;
    }

    public List<Node> getNodeList() {
        return nodeList;
    }

    public void setNodeList(List<Node> nodeList) {
        this.nodeList = nodeList;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder("MoveOrder [taskNo=" + taskNo + ", taskType=" + taskType + ", segmentNo=" + segmentNo + ", coordList=");
        if (nodeList != null) {
            sb.append("[");
            for (int i = 0; i < nodeList.size(); i++) {
                sb.append(nodeList.get(i).toString() + nodeList.get(i).getResAction() + ",");
            }
        }
        sb.append("];");
        return sb.toString();
    }
}



